home *** CD-ROM | disk | FTP | other *** search
- ;==========================================================================;
- ; QuadRam QuadPort Initialization ;
- ; ;
- ; The 8250 code is also used!!! ;
- ; ;
- ; Copyright 1987, 1988 by H. Roy Engehausen. All rights reserved. ;
- ; This software may be freely distributed and used, but it may not ;
- ; under any circumstances be sold by anyone other than the author. ;
- ; It may be distributed by a commercial company as long as it is ;
- ; for no cost. ;
- ; ;
- ; Permission is explicity granted to use this code as a model for ;
- ; other programs requiring interupt driven serial I/O as long as they ;
- ; carry this copyright notice. ;
- ;==========================================================================;
-
- CMP chip[SI],chip_qrqp ; Is this a QuadRam QuadPort?
- JNE init_not_qrqp ; Nope: skip this
-
- ;--------------------------------------------------------------------------;
- ; If this is not the first port on this interrupt vector, skip this ;
- ;--------------------------------------------------------------------------;
-
- CMP old_interrupt_vec_seg[DI],0 ; Is this the first intr handler?
- JE init_not_qrqp ; Nope: skip this
-
- ;--------------------------------------------------------------------------;
- ; Set the Master interrupt register ;
- ;--------------------------------------------------------------------------;
-
- MOV DX,baseaddr[SI] ; Get the base port address
- AND DL,basem_qrqp ; Now get the board base address
- ADD DX,qintr_qrpt ; Point to master interrupt register
-
- XOR AL,AL ;
- OUT DX,AL ; Output a zero first
-
- MOV AL,hiv[SI] ; Get the hardware interrupt vector number
-
- CMP AL,irq2_offset ; Convert it to the IRQ number
- JL qrqp_init_low ;
- SUB AL,irq2_offset-8 ;
- JMP SHORT qrqp_init_done;
- qrqp_init_low:
- SUB AL,irq_offset ;
- qrqp_init_done:
-
- CBW ;
- MOV BX,AX ; Make into an index
- MOV AL,qrqp_int_map[BX] ; Get the proper setting for the vector
- OUT DX,AL ; And send it
-
- ;--------------------------------------------------------------------------;
- ; Done ;
- ;--------------------------------------------------------------------------;
-
- init_not_qrqp: ; Not QRQP come here!